#pragma once

#include "FirstIntersectionResult.h"
#include "SecondIntersectionResult.h"
#include "Intersectable.h"

class FlatCylinder : public Intersectable
{
	Color _color;
protected:
	Point _startPoint, _direction;
	double _radius, _radiusInv, _squaredRadiusInv, _directionLenghtInv;
public:
	FlatCylinder(const Ray&, double length, double radius, const Color&);
	void WhereIntersects(const Ray&, FirstIntersectionResult& result);
	void ColorAtIntersection(SecondIntersectionResult&, const Point&, const Ray&);
	Direction NormalAtPoint(FirstIntersectionResult& , const Point&);
	~FlatCylinder();
};
